home *** CD-ROM | disk | FTP | other *** search
/ Alde ADA 1: #1 / CCCC 8804 Volume 1 Number 1 - Alde.iso / C / MISC / FUNC / PROFF.ARC / PROFFMAN.PRF < prev    next >
Encoding:
Text File  |  1988-03-08  |  46.7 KB  |  1,569 lines

  1. .so laser.mac
  2. .! Proff user's manual
  3. .! Feb. 1984 by Ozan S. Yigit
  4. .!
  5. .! Edited by Steven Tress and Terry Lim
  6. .! vers. 1.0
  7. .!
  8. .! ----------- macros ----------
  9. .! sect - produce a bold section header and
  10. .! enter a contents line. First parameter
  11. .! is indent level for contents line.
  12. .define sect
  13. .sp
  14. .cl $1 $2 $3 $4 $5 $6 $7
  15. .bd
  16. $2 $3 $4 $5 $6 $7
  17. .en
  18. .! -----------------------------
  19. .define note
  20. .sp
  21. .ce
  22. NOTE
  23. .sp
  24. .fi
  25. .in +5
  26. .rm -5
  27. .en
  28. .define endnote
  29. .sp
  30. .nf
  31. .in -5
  32. .rm +5
  33. .en
  34. .! -----------------------------
  35. .! Macros to create a point-form lists. 
  36. .! Note the use of number registers within
  37. .! the macros. See section 5.
  38. .!              
  39. .define list
  40. .nr a $1
  41. .in +$1
  42. .en
  43.  
  44. .define item
  45. .sp
  46. .ti -@na
  47. $1
  48. .en
  49.  
  50. .define nolist
  51. .in -@na
  52. .sp
  53. .en
  54. .! -----------------------------
  55. .ce 100
  56. .st +12
  57. PROFF User's Guide
  58. .sp
  59. Version 1.0
  60. .ce 0
  61. .nf
  62. .in +25
  63. .sp 15
  64. ***  *******
  65. ***  *********
  66.      **         **
  67.      **         **
  68.      *********
  69.      *******
  70.      **
  71.      **
  72.      **
  73. ******
  74. ****
  75. .in -25
  76. .fi
  77. .ce 100
  78. .st -4
  79. Ozan S. Yigit & Steven Tress
  80. March 1984
  81. .ce 0
  82. .bp 1
  83. .he /1.0/Proff User's Guide/#/
  84. .ap
  85. .fi
  86. .ju
  87. .sect 0 1.0 Introduction
  88.  This manual describes PROFF, a formatter based on the FORMAT utility
  89. presented in
  90. .ul
  91. Software Tools.
  92.  PROFF was produced to provide a powerful formatter that can be used under
  93. a variety of microcomputers, thus providing a consistent formatting tool
  94. across environments. PROFF can be used to format memos, reports, form letters 
  95. and
  96. documents such as this manual. It can also be configured to mimic 
  97. other formatting
  98. systems of similar nature.
  99.  This document itself was produced with PROFF, using most of its advanced features.
  100. PROFF took care of such things as auto-paragraphing and the production of 
  101. the Table of Contents as the manual was being formatted.
  102.  PROFF was developed under a Digital Equipment Corporation Rainbow 100,
  103. using Mark Williams C Compiler for portability reasons. PROFF is
  104. available under VAX/VMS operating system. PROFF implementations for 
  105. IBM PC and APPLE ][ microcomputers are also underway.
  106. .st -14
  107. Rainbow, VAX/VMS are trademarks of Digital Equipment Corporation.
  108. .br
  109. Mark Williams C Compiler is a trademark of Mark Williams Company.
  110. .br
  111. IBM is a registered trademark of International Business Machines Inc.
  112. .br
  113. APPLE is a trademark of Apple Computer Inc.
  114. .br
  115. UNIX is a trademark of Bell Laboratories.
  116. .bp
  117. .cl
  118. .sect 0 2.0 General Description
  119. .cl
  120. .sect 1 2.1 The Input
  121.  The text that is to be formatted by PROFF is typed into an input file
  122. using any text editor. This file contains the text to be formatted
  123. as well as PROFF commands.
  124.  Each line in the input file is either a command line or a text line. A
  125. command line is a line that begins with a period ("."). All other lines are
  126. text lines. The command lines are not printed - they tell PROFF how you want
  127. it to format the text that follows. Appendix A summarizes all of the PROFF
  128. commands for a quick reference.
  129. .sect 2 2.1.1 Text
  130.  Text can be entered into the input file in any format. PROFF removes all extra
  131. blanks and tabs between words when operating in fill mode. This means you do
  132. not have to worry about how many words you put on a line, and you can break 
  133. lines wherever it is convenient to your typing. Note however, that you cannot
  134. break a word between two lines.
  135.  Blanks and tabs at the beginning of a line are not removed. This is useful
  136. for producing special tables and performing special types of indentation.
  137. Thus, normal text lines should not have any leading tabs or blanks.
  138. .sect 2 2.1.2 Commands
  139.  A command is a line that starts with a period. Immediately following the
  140. period is a command name. Some commands accept a numeric quantity or a
  141. character string parameter, which must be separated from the command name
  142. by a space or a comma. For example, an indent command might appear as follows:
  143. .save
  144. .in +5
  145. .nf
  146. .nj
  147. .sp
  148. |
  149. |It is to do nothing that the elect exists.
  150. |.in 5
  151. |- Oscar Wilde
  152. |
  153. .restore
  154.  Assuming that the left margin was at column 1, PROFF would produce the
  155. following:
  156. .save
  157. .in +5
  158. .nf
  159. .nj
  160. .sp
  161. .need 4
  162. |
  163. |It is to do nothing that the elect exists.
  164. |     - Oscar Wilde
  165. |
  166. .restore
  167. .sp
  168. (In the examples above, as in those following, the vertical line indicates
  169. the left edge of input or the left edge of the printed page).
  170.  The number following the command may be preceeded by a "+" or "-" sign.
  171. This plus or minus sign indicates an addition or subtraction of the number
  172. to or from the current value for the command. for example, the text:
  173. .sp
  174. .save
  175. .in +5
  176. .nf
  177. .nj
  178. .need 11
  179. |
  180. |Nothing to do but work,
  181. |.in +3
  182. |Nothing to eat but food,
  183. |.in -3
  184. |Nothing to wear but clothes
  185. |.in +3
  186. |To keep one from going nude.
  187. |.in +7
  188. |-Benjamin King
  189. |
  190. .in -5
  191. .sp
  192. will produce as output:
  193. .sp
  194. .in +5
  195. .need 6
  196. |
  197. |Nothing to do but work,
  198. |   Nothing to eat but food,
  199. |Nothing to wear but clothes
  200. |   To keep one from going nude.
  201. |          -Benjamin King
  202. |
  203. .restore
  204.  If a number is not supplied with a command that requires a number, PROFF
  205. will use a default value. The defaults for each command are summarized in
  206. Appendix A.
  207. .cl
  208. .sect 1 2.2 The Output
  209.  The main functions performed by PROFF are 
  210. .ul
  211. filling
  212. and 
  213. .ul
  214. justifying.
  215. A line is
  216. filled by packing as many words onto it as will fit. The line is justified
  217. by spacing words evenly between the left and right margins. When PROFF starts,
  218. it assumes that the text is to be filled and justified. Of course, when fill
  219. and justify are not needed (as in the case of a letter or a table), there are
  220. commands to turn these features off, and back on again, as necessary.
  221.  When PROFF is in fill mode, it normally strips out extra spaces and tabs 
  222. between words.
  223.  Many PROFF commands cause a
  224. .ul
  225. break
  226. to occur in the output. This means that the line currently being filled is 
  227. immediately output. Any following text goes into a new output line.
  228. .cl
  229. .sect 1 2.3 Executing PROFF
  230.  Once a text file is ready for formatting, PROFF is started by typing
  231. the program name, various options, name of the input file and the name
  232. of the output file. For example the command
  233. .sp
  234. .in +5
  235. A> proff  -po5 proffman.prf proff.man
  236. .sp
  237. .in -5
  238. would produce this document as proff.man, from an input file proffman.prf, 
  239. shifted right by 5 spaces.
  240. (The symbol "A>" is CP/M system prompt).
  241. .cl
  242. .sect 1 2.4 Bibliographic Notes
  243.   PROFF was produced by re-writing the Software Tools Formatter FORMAT.
  244. Some of the ideas are from Freshwater Institute RUNOFF, NROFF, 
  245. University of Waterloo SCRIPT
  246. and other formatters of similar nature. The underlying ideas of the
  247. mentioned above formatters may be found in
  248. .ul
  249. Software Tools
  250. by B.W. Kernighan and P.J. Plauger. 1976. (Addison-Wesley, Reading, Mass.).
  251. .cl
  252. .sect 1 2.5 References and Readings
  253. .nf
  254. .nap
  255. .sp
  256. Brian W. Kernighan and P. J. Plauger,
  257. .ul
  258. Software Tools
  259. Addison-Wesley (1976)
  260. .sp
  261. R. Furuta, J. Scofield and A. Shaw,
  262. .ul
  263. Document Formatting Systems:
  264. .ul
  265. Survey, Concepts, and issues
  266. ACM Computing Surveys, Sept. 1982, Pp. 417
  267. .sp
  268. Mark Stuart Brader,
  269. .ul
  270. An Incremental Text Formatter
  271. Department of Computer Science
  272. University of Waterloo, CS-81-12
  273. .bp
  274. .fi
  275. .ap
  276. .cl
  277. .sect 0 3.0 Command Descriptions
  278.  This section describes PROFF commands. Commands specify how the program is
  279. to process the text lines in the input file. Lines in the input file that
  280. begin with a period (or the control character selected by the user) 
  281. immediately followed by a command name are commands. Any line that begins
  282. with a period and followed by a _# or _! is a comment line and is ignored
  283. by PROFF - this allows you to put information in the file that will be neither
  284. processed nor output by PROFF.
  285.  As described earlier, some of the commands can be followed by "parameters".
  286. Parameters are used in executing a command; for example, in the command
  287. ".sp 3", the parameter "3" tells the formatter to insert 3 blank lines into
  288. the document. The following conventions are used in describing the parameters:
  289. .sp
  290. .in +5
  291. .ti -2
  292. o Parameters surrounded by square brackets are optional. If not supplied, PROFF
  293. assumes a default value. 
  294. .br
  295. (e.g. .sp [n])
  296. .sp
  297. .ti -2
  298. o Parameters surrounded by angle brackets are mandatory. PROFF will display
  299. a fatal error message if the parameter is absent. (e.g. .set <variable name>)
  300. .sp
  301. .ti -2
  302. o Parameters surrounded by squiggly brackets are to be typed exactly as
  303. indicated. (e.g. .pn {roman})
  304. .sp
  305. .ti -2
  306. o A bar character seperating the parameters within brackets indicate an
  307. alternative. (e.g. .st [+|-][n] means both .st [+n] and .st [-n])
  308. .in -5
  309.  In describing the commands, the command is typed exacty as accepted by PROFF
  310. with the associated control character default ("."). If more than one form of
  311. the command is accepted by PROFF, the command names are separated with a
  312. bar indicating an alternative.
  313. .bp
  314. .cl
  315. .sect 1 3.1 Filling and Justifying
  316. .nap
  317. .in +5
  318. .!
  319. .! define a simple macro for generating the headers.
  320. .! note that the second "$" within macro is for 
  321. .! variable expansion. Initially, the variable name
  322. .! is passed into the macro WITHOUT any expension.
  323. .! we also use the new control character within macro.
  324. .!
  325. .define comm
  326. \sp
  327. \cl 2 $$1
  328. \ti -5
  329. $$1
  330. \sp
  331. .en
  332. .! change the control character from period (".") to a backslash ("\")
  333. .! to avoid the interpretation of the command headers
  334. .!
  335. .cchar \
  336. \!
  337. \! Variable creation
  338. \! We use variables to avoid re-typing of multiple options over
  339. \! and over again. These variable names will be reused in the
  340. \! appendix to produce a quick referance
  341. \!
  342. \set FILL ".fi | .f | .fill"
  343. \comm FILL
  344. The fill command causes a line to be filled with as many words as the right
  345. margin allows. For this purpose, all extra blanks and tabs are removed between
  346. words. Each word is separated with a single blank. PROFF automatically assumes
  347. fill mode during the startup.
  348. \set NOFILL ".nf | .nofill"
  349. \comm NOFILL
  350. No fill discontinues the filling of the text. PROFF simply copies the text
  351. to the output. This command may be used to pass tables and other text
  352. unaltered through the formatter.
  353. \set JUST ".ju | .j | .justify"
  354. \comm JUST
  355. Justify causes the words on a line to be evenly spaced between the left and
  356. the right margins. Note that lines can be justified only if lines are also
  357. being filled. PROFF automatically assumes justify mode during the startup.
  358. \set NOJUST ".nj | .nojustify"
  359. \comm NOJUST
  360. No justify discontinues the text justification.
  361. \in -5
  362. \cchar .
  363. .bp
  364. .cl
  365. .sect 1 3.2 Text Formatting
  366. .in +5
  367. .cchar \
  368. \set BREAK ".br | .break"
  369. \comm BREAK
  370. Break causes a break: the current line is printed without justification,
  371. and the next word is placed at the beginning of a new line. Note that many
  372. PROFF commands cause an implicit break.
  373. \set INDENT ".in | .lm | .leftmargin [+|-][n]"
  374. \comm INDENT
  375. Indent causes a break and indents the following lines [n] spaces to the
  376. right of the left margin. [n] can be negative to allow beginning a line
  377. to the left of the left margin, however, a line cannot begin to the left of
  378. column 0. If a plus or minus sign is used with n, then [n] is added or
  379. subtracted to or from the current value.
  380. \set TINDENT ".ti | .i | .left [+|-][n]"
  381. \comm TINDENT
  382. Temporary indent is identical to the indent command except that it 
  383. applies only to the next line of printed text. Thus, the command
  384. ".ti +5" would cause the next line to be printed 5 spaces to the right
  385. of those that follow.
  386. \set SPACETO ".st | .spaceto [-][n]"
  387. \comm SPACETO
  388. Spaceto allows spacing to line [n] from the top of the current page.
  389. If a negative [n] is specified, than spacing is performed to line [n]
  390. from the bottom of the page (excluding the footer lines). Thus, footnotes
  391. can be set at a fixed distance from the bottom of the page by a command such
  392. as ".st -5".
  393. \set SPACE ".sp | .s | .skip [n]"
  394. \comm SPACE
  395. Space causes a break and skips [n] lines, except at the top of 
  396. a page. The space command
  397. is dependent on the setting of line spacing.
  398. \set CENTER ".ce | .center [n | on | off]"
  399. \comm CENTER
  400. Center causes the next [n] lines of text to be centered between the left
  401. and right margins. Centering may be started with "on" and terminated with
  402. "off", in which case all input lines between these commands will be centered.
  403. \set UNDLINE ".ul | .underline [n | on | off]"
  404. \comm UNDLINE
  405. Underline command causes the text on the next [n] input lines to be underlined
  406. when printed. If [n] is omitted, only the next line is underlined. This command
  407. does not cause a break, so words in filled text may be underlined by:
  408. \sp
  409. \save
  410. \cchar .
  411. .in +5
  412. .nf
  413. .need 11
  414. .sp
  415. |
  416. |The "Pay-off" Theory: Only
  417. |.ul
  418. |losers
  419. |believe in luck, horses, horoscopes
  420. |and
  421. |.ul
  422. |lotteries.
  423. |
  424. .in -5
  425. .sp
  426. to get
  427. .in +5
  428. .sp
  429. .fi
  430. |
  431. .br
  432. |The "Pay-off" Theory: Only
  433. .ul
  434. losers
  435. believe in
  436. .br
  437. |luck, horses, horoscopes and
  438. .ul
  439. lotteries.
  440. .br
  441. |
  442. .sp
  443. .restore
  444. Underlining may be started with "on" and terminated with "off", similar to
  445. the centering command.
  446. \set CUNDLINE ".ul | .underline [all | words]"
  447. \comm CUNDLINE
  448. This version of the underline command is used to set the mode of
  449. underlining:
  450. \sp
  451. \nap
  452. \in +5
  453. \nf
  454. all   - underline across all characters,
  455.         including spaces.
  456. \br
  457. words - underline words only
  458. \fi
  459. \sp
  460. \in -5
  461. \ap
  462. \set BOLD ".bd | .bold [n | on | off]"
  463. \comm BOLD
  464. The bold command causes the text on the next [n] input lines to be highlighted
  465. by overstriking. If [n] is omitted, only the next line is highlighted.
  466. Bolding may be started with "on" and terminated with "off" as in the
  467. case of the center and underline commands.
  468. \set DBO ".db | .dbo | .disablebolding"
  469. \comm DBO
  470. Turns the bolding off, all bolding commands are ignored. This feature is
  471. useful for rough drafts.
  472. \set EBO ".eb | .ebo | .enablebolding"
  473. \comm EBO
  474. Turns the bolding feature back on. Bolding is turned on during the PROFF
  475. startup.
  476. \in -5
  477. \cchar .
  478. .bp
  479. .cl
  480. .sect 1 3.3 Page Formatting
  481. .in +5
  482. .cchar \
  483. \set LS ".ls | .spc | .spacing [n]"
  484. \comm LS
  485. Line spacing is the command to set line spacing. Set n to 1 for single spacing,
  486. 2 for double spacing etc. 
  487. \set BP ".bp | .pg | .page [n]"
  488. \comm BP
  489. The begin page command causes a break, ends the current page, outputs
  490. footers if required and begins a new page. If [n] is present, the page number
  491. is set to [n]. The default action is to number the pages incrementally.
  492. \set PN ".pn | .pagenumber {roman} | {arabic}"
  493. \comm PN
  494. Page number command defines the format of the page number. Uppercase roman
  495. numerals may be obtained with "roman" keyword. To convert the page numbers
  496. back to normal, "arabic" is specified. PROFF uses arabic numerals as
  497. a default.
  498. \set NPA ".np | .nopaging"
  499. \comm NPA
  500. No paging disables the pagination. When PROFF is in no paging mode,
  501. "begin page" (.bp) and "page length" (.pl) commands are ignored. This mode
  502. of operation is especially useful for using the proff output with the
  503. multi-column formatter (MC).
  504. \set PA ".pa | .paging"
  505. \comm PA
  506. Paging enables normal page generation. This command starts a 
  507. new page and restores the page length to the
  508. value previous to the ".np" command.
  509. \set NE ".ne | .need | .tp | .testpage [n]"
  510. \comm NE
  511. Test page checks to see whether at least [n] lines remain in the
  512. current page. If less than this number of lines remain, printing will resume
  513. at the top of a new page. If [n] is missing, it is assumed to be zero.
  514. \set HE ".he | .header <text>"
  515. \comm HE
  516. Header sets the text to be printed on top of each page. <text> is 
  517. divided into sections which are to be left justified, centered and right
  518. justified. To divide <text> into these three parts, the first character is
  519. assumed to be a separator. (e.g. /left/center/right/) But any non-alphanumeric
  520. character may also be used. The characters "#" and "%" are replaced with the
  521. current page number and day/time in the header. 
  522. \set FO ".fo | .footer <text>"
  523. \comm FO
  524. Footer is identical to header except that it sets the text to be printed
  525. at the bottom of each page.
  526. \set OHE ".oh <text>"
  527. \comm OHE
  528. The odd header command sets the header for odd pages only.
  529. \set EHE ".eh <text>"
  530. \comm EHE
  531. The even header command sets the header for even pages only.
  532. \set OFO ".of <text>"
  533. \comm OFO
  534. The odd footer command sets the footer for odd pages only.
  535. \set EFO ".ef <text>"
  536. \comm EFO
  537. The even footer command sets the footer for even pages only.
  538. \in -5
  539. \cchar .
  540. .bp
  541. .cl
  542. .sect 1 3.4 Page Layout
  543. .ap
  544.  These commands are used to specify where on the page you want the formatted
  545. text to be placed. The general layout of a page is as follows:
  546. .nap
  547. .need 30
  548. .nf
  549.  
  550.     page offset (.po)                |
  551.     |                        |
  552.     V                        |
  553.     +----+-------------------------------------+----+ -+
  554.     |    |    top margin (m1) includes header       |    |  |
  555.     +----+-------------------------------------+----+  |
  556.     |    |        top margin 2 (m2)       |    |  |
  557.     +----+-------------------------------------+----+  |
  558.     |    |            .           |    |  P
  559.     |    |<-- indent (.in)    .           |    |  A
  560.     |    |            .           |    |  G
  561.     |    |                T           |    |  E
  562.     |    |                 E           |    |
  563.     |    |                   X                 |    |  L
  564.     |    |                 T           |    |  E
  565.     |    |            .           |    |  N
  566.     |    |             right margin (.rm) -->|    |  G
  567.     |    |            .           |    |  T
  568.     |    |            .           |    |  H
  569.     |    |            .           |    |  |
  570.     +----+-------------------------------------+----+  |
  571.     |    |            bottom margin 3 (m3)          |    |  |
  572.     +----+-------------------------------------+----+  |
  573.     |    |    bottom margin (m4) includes footer |    |  |
  574.     +----+-------------------------------------+----+ -+
  575.     |                        |
  576.     |                        |
  577. .fi
  578. .in +5
  579. .cchar \
  580. \set PO ".po | .offset [+|-][n]"
  581. \comm PO
  582. The page offset command moves the entire page to the right or left depending on the
  583. specified value. All indentation is according to the page offset. PROFF
  584. assumes a page offset of 0 during the startup. If [n] is specified with a
  585. plus or minus, it will be added or subtracted from the current value.
  586. \set RM ".rm | .rightmargin [+|-][n]"
  587. \comm RM 
  588. Right Margin sets the position of the last printable character from the
  589. left edge of the page to [n]. Default value for right margin is 65.
  590. A plus or minus value will be added or subtracted from the current value.
  591. If [n] is not specified, right margin is set to the default value.
  592. \set PL ".pl | .ps | .pagesize [n]"
  593. \comm PL
  594. Page length is used to set the number of lines that are to be printed
  595. on a page including the header and footer lines. After [n] lines are printed,
  596. the paper will advance to the top of next page. The default page length is
  597. 66 lines (11 inches for 6 lines/inch). This command is disabled if nopaging
  598. is set.
  599. \set M1 ".m1 [n]"
  600. \comm M1
  601. Margin 1 sets the number of lines (including the header) which will be left at
  602. the top of the page to [n]. The default setting is 3. If [n] is omitted, is
  603. set to the default.
  604. \set M2 ".m2 [n]"
  605. \comm M2
  606. Margin 2 sets the number of blank lines between the header and the first
  607. line of text. The default setting is 2.
  608. \set M3 ".m3 [n]"
  609. \comm M3
  610. Margin 3 sets the number of blank lines between the footer and the last line
  611. of text. The default setting is 2.
  612. \set M4 ".m4 [n]"
  613. \comm M4
  614. Margin 4 sets the number of lines (including the footer) which will be left at
  615. the bottom of the page to [n]. The default setting is 3.
  616. \in -5
  617. \cchar .
  618. .bp
  619. .cl
  620. .ap
  621. .sect 1 3.5 Table of Contents
  622.  This section describes the the commands that are used to generate a table of
  623. contents. Basically, a contents line command is used in every place in
  624. the document where an entry is needed in the table of contents. PROFF
  625. stores the text and the page number when it encounters this command.
  626. After the the body of the document is processed, a print contents command
  627. dumps the contents table. The contents should be dumped in a new page, with
  628. nofill. Page numbering should be disabled if the table of contents is to be
  629. used in front of the document.
  630. .sp
  631. .in +5
  632. .ap
  633. .cchar \
  634. \set CL ".cl | .contline [<n> <text>]"
  635. \comm CL
  636. Contents line specifies a line of <text> to be entered into the table of
  637. contents. <n> specifies the level at which the item is to be printed
  638. in the table. When the table is printed, each level of entry will be
  639. indented by specific number of spaces. 
  640. <text> appears in the output exactly as it appears
  641. in the contents line command, except that leading blanks are removed.
  642. If no options specified in the contents line, a blank is inserted during
  643. the table output.
  644. \set PC ".pc | .printcont [n]"
  645. \comm PC
  646. Print Contents causes the currently accumulated table of contents to be
  647. printed. If [n] is specified, it is used as the indent value for each
  648. level.  If [n] is not specified, it is defaulted to 3.
  649.  A contents line at level 0 is as wide as rightmargin-indent. The
  650. outlook of the table of contents may be changed by altering the right
  651. margin and indent values. A typical table of contents may be produced as
  652. follows:
  653. \in +5
  654. \nf
  655. \sp
  656. |.page
  657. |.he ////
  658. |.fo ////
  659. |.nofill
  660. |.sp
  661. |.center
  662. |Table of Contents
  663. |.sp
  664. |.printcont
  665. \in -5
  666. \fi
  667. \sp
  668. The following example illustrates the generation of a table of contents. Note
  669. that only one table of contents is active for a PROFF session.
  670. \need 40
  671. \sp
  672. \in +5
  673. \nf
  674. \nap
  675. .cl
  676. .cl 0 A. Introduction
  677. Introduction
  678.     text
  679.     .
  680. .cl
  681. .cl 0 B. Methods
  682. Methods
  683.     text
  684.     .
  685. .cl 1 a) Sampling Procedures
  686. Sampling
  687.     text
  688.     .
  689. .cl 1 b) Laboratory Procedures
  690. Laboratory
  691.     text
  692.     .
  693. .cl
  694. .cl 0 C. Results
  695. Results
  696.     text
  697.     .
  698.     .
  699. .pg
  700. .nf
  701. .he ////
  702. .fo ////
  703. .ce
  704. Table of Contents
  705. .sp
  706. .pc
  707. \sp
  708. \in -5
  709. These commands will produce the following table:
  710. \sp
  711. \in +5
  712.         Table of Contents
  713.  
  714. A. Introduction...............................   1
  715.  
  716. B. Methods....................................   3
  717.    a) Sampling Procedures.....................   3
  718.    b) Laboratory Procedures...................   4
  719.  
  720. C. Results....................................   5
  721. \sp
  722. \in -5
  723. \fi
  724. Macros may be defined as described in the following sections to help the generation
  725. of the table of contents.
  726. \cchar .
  727. .in -5
  728. .bp
  729. .cl
  730. .ap
  731. .sect 1 3.6 Miscellaneous
  732.  This section describes miscellaneous commands that radically increase the
  733. formatting powers of PROFF. With the assistance of variables, PROFF can 
  734. generate form letters and documents with dynamic parts. The ability to save
  735. and restore formatter context eliminates the need to remember the exact
  736. settings of the formatter across the document.
  737. .in +5
  738. .cchar \
  739. \set VSET ".vs | .set <variable> [definition]"
  740. \comm VSET
  741. Set variable  defines a variable to be later used in the document.
  742. If the definition part is left out, PROFF uses the variable name as a prompt
  743. and allows the user to define the variable interactively. Variable names cannot
  744. start with a numeric character, and may only contain alphanumeric 
  745. characters. The definition of a variable may not contain any blanks, unless
  746. they are surrounded by double-quotes. To get a double quote within a a quoted 
  747. definition, two double-quotes are used.
  748.  Once the variable is
  749. defined, it can be used anywhere in the document, including the command
  750. line itself. A variable substitution is invoked by a dollar sign (_$). (A 
  751. literal _$ is inserted into text using ___$).
  752. A variable name must be delimited by a non-alphanumeric character within the 
  753. text. If the contents of the variable is to be appended to other 
  754. alphanumeric characters, it must be surrounded by wiggly braces 
  755. ("{" and "}"). The following is an example of variable usage:
  756. \need 12
  757. \sp
  758. \nf
  759. |.nf
  760. |.vs v1 Murphy
  761. |_${v1}'s first law:
  762. |    Nothing is as easy as it looks.
  763. |_${v1}'s second law:
  764. |    Everything takes longer than you think.
  765. |Charley's observation:
  766. |    Computers were invented by _$v1.
  767. |
  768. \sp
  769. Produces the following:
  770. \sp
  771. \need 8
  772. |
  773. |Murphy's first law:
  774. |    Nothing is as easy as it looks.
  775. |Murphy's second law:
  776. |    Everything takes longer than you think.
  777. |Charley's observation:
  778. |    Computers were invented by Murphy.
  779. |
  780. \sp
  781. \fi
  782. \bp
  783. \set VGET ".vg | .get <variable> <prompt>"
  784. \comm VGET
  785. Get variable is the interactive version of variable definition. In this 
  786. variant, a prompt string is used to obtain the value of the variable,
  787. which is typed at the user's terminal. If the prompt string is to 
  788. contain blanks, tabs etc., it must be enclosed in double quotes. No quotes
  789. are necessary for input text.
  790. \set VRG ".nr <a-z> [+|-][n]"
  791. \comm VRG
  792. Number register is used to define registers that contain numeric values.
  793. There are 26 number registers, named a-z. The command ".nr x n" sets the
  794. number register "x" to value n; ".nr x +n" increments the number register
  795. by n; ".nr x -n" decrements the number register by n. The value of the
  796. number register x is placed in the text by the appearance of _@nx. A literal
  797. _@ may be inserted using ___@.
  798. Number registers may be used on command lines and anywhere in the text.
  799. \set CCHAR ".cc | .cchar [char]"
  800. \comm CCHAR
  801. Control Character  sets the character that distinguishes PROFF 
  802. commands from text to be formatted. As a default, control character is set to 
  803. (".") period.
  804. This character may be changed to something other than a period, either
  805. to mimic other formatters or to disallow interpretation of lines beginning
  806. with a period. (This document makes heavy use of the .cc command).
  807. \set ECHAR ".ec | .echar [char]"
  808. \comm ECHAR
  809. Escape Character  sets the character that disallows the 
  810. interpretation of spacial characters such as _@ and _$. PROFF uses an
  811. underline ("__") character as a default.
  812. \set SOU ".so | .source | .include | .require [filename]"
  813. \comm SOU
  814. The source (include) command allows external files to be inserted into the 
  815. input file
  816. during the formatting. Using this feature, tables, graphs and other 
  817. documents generated outside PROFF may be included into the document
  818. being formatted. This feature is also very useful in including a common set
  819. of macros during formatting. Include files may be nested inside other
  820. include files. Currently, PROFF only allows a nested include
  821. files level of 8. Filename may be enclosed in quotes.
  822. \set SAVE ".sv | .save"
  823. \comm SAVE
  824. The save command allows the saving of the current formatter context on a 
  825. pushdown stack. The saved context of the formatter segment (FSECT) includes
  826. the following values and flags:
  827. \need 14
  828. \sp
  829. \nf
  830. \nap
  831. values            flags        on   |  off
  832. ------            -----        
  833. indent         (.in)    fill        (.fi | .nf)
  834. right margin    (.rm)    justify     (.ju | .nj)
  835. offset        (.po)    paging      (.pa | .np)
  836. line spacing    (.ls)    number type       (.pn)
  837. page length    (.pl)    bolding        (.eb | .db)
  838. margin values    (.m1)    autoparagraph    (.ap | .na)
  839.         (.m2)
  840.         (.m3)
  841.         (.m4)
  842. control char    (.cc)
  843. escape char    (.ec)
  844. \sp
  845. \ap
  846. \fi
  847. \set RST ".rs | .restore"
  848. \comm RST
  849. The restore command pops the context stack and restores the values and flags
  850. as defined above.
  851. \set LEX ".lx | .lex <command> [equate]"
  852. \comm LEX
  853. The lexical modification command is essentially a permanent replacement of a
  854. given command. This command is used for changing the command names without
  855. resorting to the macro facility. Lex permanently removes the old
  856. command name from command tables and replaces it with the new definition.
  857. If the equate is not specified, the command  becomes undefined and is
  858. no longer recognised by PROFF. The command equate should not contain 
  859. non-alphanumeric characters.
  860. \set APR ".ap | .autoparagraph"
  861. \comm APR
  862. The autoparagraph command turns on the automatic paragraphing feature. If
  863. auto-paragraphing is on, every line that starts with a 
  864. \ul
  865. blank
  866. or a 
  867. \ul
  868. tab
  869. character starts a new paragraph. A new line is generated (.sp) and
  870. the beginning of the paragraph is indented by five spaces.
  871. Autoparagraphing is the equivalent of the following commands:
  872. \in +5
  873. \nf
  874. |
  875. |textextextextext
  876. |.sp
  877. |.ti +5
  878. |textextextextext
  879. |
  880. \in -5
  881. \fi
  882. \set NAP ".na | nap | .noautoparagraph"
  883. \comm NAP
  884. No Autoparagraph command disables auto-paragraphing.
  885. \set WRT ".wr | .write <string>"
  886. \comm WRT
  887. Write is a special output command, only to be used to configure printers
  888. and other output devices with escape sequences. This command outputs the
  889. associated string as it is encountered, without going through the normal
  890. output routines of the formatter. Currently, the output string may contain
  891. control characters specified as "^<char>", decimal numbers within the range
  892. of 1-255, and other characters. Blanks within the string are skipped. Any
  893. portion of the string enclosed with double quotes is output as is. To output
  894. a double quote, two double quotes must be used within the quoted string.
  895. Following is a typical string to set a Digital La-100 printer to letter
  896. quality print mode:
  897. \sp
  898. \nf
  899. \in +5
  900. |
  901. |.wr ^["[2z"
  902. |
  903. \sp
  904. \fi
  905. \in -5
  906. In the control string, "^[" is the ASCII equivalent of the Escape (esc) character.
  907. Following mapping table is used to convert characters starting with a caret
  908. to their binary equivalents: ("|" indicates an alternative)
  909. \nf
  910. \nap
  911. \sp
  912. \in +5
  913. Control chr    Dec.    Oct.    Hex.
  914. -----------    ----    ----    ----
  915. ^a | ^A    (soh)    1    01      01
  916. ^b | ^B    (stx)    2    02    02
  917. ^c | ^C    (etx)    3    03    03
  918. ^d | ^D    (eot)    4    04    04
  919. ^e | ^E    (enq)    5    05    05
  920. ^f | ^F    (ack)    6    06    06
  921. ^g | ^G    (bel)    7    07    07
  922. ^h | ^H    (bs)    8    10    08
  923. ^i | ^I    (ht)    9    11    09
  924. ^j | ^J    (nl)    10    12    0A
  925. ^k | ^K    (vt)    11    13    0B
  926. ^l | ^L    (np)    12    14    0C
  927. ^m | ^M    (cr)    13    15    0D
  928. ^n | ^N    (so)    14    16    0E
  929. ^o | ^O    (si)    15    17    0F
  930. ^p | ^P    (dle)    16    20    10
  931. ^q | ^Q    (dc1)    17    21    11
  932. ^r | ^R    (dc2)    18    22    12
  933. ^s | ^S    (dc3)    19    23    13
  934. ^t | ^T    (dc4)    20    24    14
  935. ^u | ^U    (nak)    21    25    15
  936. \bp
  937. ^v | ^V    (syn)    22    26    16
  938. ^w | ^W    (etb)    23    27    17
  939. ^x | ^X    (can)    24    30    18
  940. ^y | ^Y    (em)    25    31    19
  941. ^z | ^Z    (sub)    26    32    1A
  942. ^[    (esc)    27    33    1B
  943. ^\    (fs)    28    34    1C
  944. ^]    (gs)    29    35    1D
  945. ^^    (rs)    30    36    1E
  946. ^__    (us)    31    37    1F
  947. \sp
  948. \in -5
  949. \ap
  950. \fi
  951. \cchar .
  952. .in -5
  953. .bp
  954. .cl
  955. .sect 1 3.7 Defining New Commands (Macros)
  956.  In document formatting, it is common to repeat a series of commands at
  957. several places in the document. PROFF allows you to define a new command
  958. that will replace these repeated commands. This not only saves typing but
  959. ensures that
  960. .ul
  961. exactly
  962. the same sequence of commands are applied throughout the document. A new
  963. command that you define is formally called a
  964. .ul
  965. macro.
  966. To define a macro, you must use the define macro (.de | .define) and
  967. end macro (.en) commands.
  968. .in +5
  969. .cchar \
  970. \set DEF ".de | .define <macro name>"
  971. \comm DEF
  972. Define is used to define a <macro name> to which a series of commands to
  973. be assigned. This definition line is followed by any number of PROFF
  974. commands and/or text which define the action that the macro
  975. will subsequently produce. Macros may refer to other macros.
  976. \set ENM ".en"
  977. \comm ENM
  978. End macro is the last line in the command definition. You must put in this
  979. command to finish a currently defined macro. ".en" command should not be
  980. re-defined as a macro.
  981. \in -5
  982. \sp
  983. The example below defines macros ".note" and ".endnote", similar to the
  984. RUNOFF commands of the same name.
  985. \in +5
  986. \nap
  987. \nf
  988. \need 20
  989. \sp
  990. |
  991. |.define note
  992. |.sp
  993. |.ce
  994. |NOTE
  995. |.sp
  996. |.fi
  997. |.in +5
  998. |.rm -5
  999. |.en
  1000. |
  1001. |.define endnote
  1002. |.sp
  1003. |.nf
  1004. |.in -5
  1005. |.rm +5
  1006. |.en
  1007. |
  1008. \in -5
  1009. \ap
  1010. \fi
  1011.  A macro is used like any other PROFF command, control character followed
  1012. immediately  by the name of the macro. For example, the above macros
  1013. may be used as follows:
  1014. \in +5
  1015. \nap
  1016. \need 9
  1017. \nf
  1018. \sp
  1019. |
  1020. |.note
  1021. |textextextextextextextextextext
  1022. |              .
  1023. |           .
  1024. |           .
  1025. |.endnote
  1026. |
  1027. \in -5
  1028. \sp
  1029. \fi
  1030. The following note is generated by the same macros described previously.
  1031. \cc .
  1032. .nap
  1033. .note
  1034. Flap's Law: Any inanimate object, regardless of its position or configuration,
  1035. may be expected to perform at any time in a totally unexpected manner for
  1036. reasons that are either entirely obscure or else completely mysterious.
  1037. .endnote
  1038. .fi
  1039. .cc \
  1040. \ap
  1041. Special symbols may be used within a macro definition. These symbols represent
  1042. the parameters passed to a macro, delimited by blanks or commas.
  1043. These symbols are _$0 for macro name, _$1 for the first parameter, _$2 for
  1044. the second parameter and so on, up to _$9 for the ninth parameter. Currently,
  1045. macro parameters may only contain alphanumerics, no string parameters are
  1046. possible. The previous macro "note" may now be defined as follows:
  1047. \in +5
  1048. \nap
  1049. \nf
  1050. \need 20
  1051. \sp
  1052. |
  1053. |.define note
  1054. |.sp
  1055. |.ce
  1056. |_$2 _$3 _$4 _$5 _$6 _$7 _$8 _$9
  1057. |.nr m _$1
  1058. |.sp
  1059. |.fi
  1060. |.in +_$1
  1061. |.rm -_$1
  1062. |.en
  1063. |
  1064. |.define endnote
  1065. |.sp
  1066. |.nf
  1067. |.in -_@nm
  1068. |.rm +_@nm
  1069. |.en
  1070. |
  1071. \in -5
  1072. \ap
  1073. \fi
  1074.  In this version of the "note" and "endnote" macros, the first parameter (_$1)
  1075. is used to pass the value for indentation and right margin adjustment.
  1076. All the rest of the macro parameters (_$2 - _$9) are used as the title of
  1077. the note. The indent value passed as the first parameter is also saved in the
  1078. number register "m" to communicate it to the "endnote" macro, such that
  1079. when the endnote macro is called, both indent and right margin values are
  1080. adjusted back to normal. It is possible and may be more useful to use
  1081. ".save" and ".restore" commands to accomplish the same task, especially if
  1082. the macro alters the current formatting context drastically. The ".note"
  1083. and ".endnote" macros may be called as follows:
  1084. \in +5
  1085. \nap
  1086. \need 9
  1087. \nf
  1088. \sp
  1089. |
  1090. |.note 5 Asimov's Law of Robotics
  1091. |textextextextextextextextextext
  1092. |              .
  1093. |           .
  1094. |           .
  1095. |.endnote
  1096. |
  1097. \in -5
  1098. \fi
  1099. \ap
  1100.  In this usage, the indent value will be adjusted by +5, right margin will
  1101. be adjusted by -5, and the title "Asimov's Law of Robotics" will appear
  1102. centered above the note.
  1103. \cchar .
  1104. .bp
  1105. .cl
  1106. .sect 0 4.0 Executing PROFF
  1107.  The PROFF program  may be invoked with a series of optional parameters and
  1108. filenames on the command line. The command synopsis is:
  1109.  
  1110. PROFF [+n] [-n] [-v] [-s] [-pon] [-ifile] input [output]
  1111.  
  1112. The square brackets indicate an optional parameter. Interpretation of the
  1113. parameters is as follows:
  1114. .nap
  1115. .in +10
  1116. .define opt
  1117. .need 5
  1118. .sp
  1119. .ti -5
  1120. .bd
  1121. $1
  1122. .br
  1123. .en
  1124. .opt +n
  1125. Start the printing of the document at the first page with
  1126. number n.
  1127. .opt -n
  1128. Stop printing at the first page numbered higher than n.
  1129. .opt -v
  1130. Verbose mode. PROFF indicates the source files being included into
  1131. document, and produces a summary of the number of textlines read in, the number
  1132. of lines and actual pages generated. A memory usage summary of internal
  1133. storage for macros, stacks and tables is also displayed.
  1134. .opt -s
  1135. Stop before each page, including the first one to allow paper
  1136. adjustment. A prompt is given just before the first page. For each
  1137. page thereafter, the terminal bell is rung to indicate that another sheet
  1138. of paper is needed.
  1139. .opt -pon
  1140. Sets the page offset to n. This is equivalent to ".po" command within
  1141. the document. It is recommended that -pon option be used instead of
  1142. embedding the offset value within the document.
  1143. .opt -ifile
  1144. Includes the given file to the formatted document. This is equivalent to
  1145. a ".include file" command within the document. This option may be
  1146. repeated more than once, -ifile1 -ifile2 etc. 
  1147. .opt input
  1148. Specifies the input file to be formatted. PROFF does not impose any
  1149. file extension. The recommended extension is ".PRF".
  1150. .opt output
  1151. Specifies the output file for the formatted document. If this is omitted,
  1152. output is directed to the user's terminal.
  1153. .in -10
  1154.  
  1155. Following are some examples of PROFF command lines:
  1156.  
  1157. .ti +5
  1158. A>PROFF -v proffman.prf
  1159.  
  1160. Format this document (proffman.prf) in verbose mode, and output the
  1161. formatted document to the
  1162. terminal.
  1163.  
  1164. .ti +5
  1165. A>PROFF +5 -imacros.pma proffman.prf
  1166.  
  1167. Format this document, include the external file MACROS.PMA, skip the first
  1168. four pages and output the formatted document to the terminal.
  1169.  
  1170. .ti +5
  1171. A>PROFF -po10 proffman.prf proff.man
  1172.  
  1173. Format this document, shift the entire document by 10 spaces to right and
  1174. output to a file called proff.man.
  1175. .bp
  1176. .cl
  1177. .sect 0 5.0 Tips on using PROFF
  1178. .ap
  1179. .sect 1 5.1 Care and Feeding of Memory
  1180.  PROFF uses a dynamic memory allocation scheme for some of its operations.
  1181. These are macro definitions, contents lines, variables and save context 
  1182. operation.
  1183. Running PROFF under microcomputers with limited memory resources (64k or less)
  1184. require some care in using these commands:
  1185. .list 3
  1186. .item a)
  1187. Do not declare macros that are not needed within the document.
  1188. .item b)
  1189. Do not use comments within macros. Due to delayed evaluation, comments
  1190. will also be stored as a part of the macro definition.
  1191. .item c)
  1192. Where possible, avoid using too much text within macros. It is just as
  1193. easy to pass the information during the macro call.
  1194. .item d)
  1195. Use only the shortest form of commands within macros.
  1196. .item e)
  1197. Be brief in contents line text.
  1198. .item f)
  1199. Use short variable names as long as it is not so cryptic as to be confusing.
  1200. .item g)
  1201. Avoid unnecessary blanks within the variable definitions.
  1202. .item h)
  1203. Avoid too many context saves without a corresponding restore. The restore
  1204. operation reclaims the memory used for a save.
  1205. .nolist
  1206.  Even if the formatter is used with a system of large memory resources,
  1207. some of the precautions above are applicable. (Utz's 4th law of Computer
  1208. Programming: Any given program will eventually expand to fill all the
  1209. available memory.) Using the -v option under memory-restricted systems
  1210. may be useful in determining the memory usage.
  1211.  
  1212. .sect 1 5.2 Formatting without fuss
  1213.  PROFF, using its default settings, may provide reasonably formatted output
  1214. in many situations.
  1215. As an example, examine the document PROFF.TUT. This document does not use
  1216. ANY formatting commands. All formatting is done with the default settings.
  1217.  
  1218. .sect 1 5.3 Variables within macros
  1219.  Variable expansions may be performed within the macros. Typically, one
  1220. of the parameters of the macro is assumed to be a variable, which is expanded
  1221. only after the macro is used. Thus:
  1222. .in +5
  1223. .nf
  1224.  
  1225. |
  1226. |.define xx
  1227. |.ce
  1228. |_$_$1
  1229. |.cl _$_$1
  1230. |.en
  1231. |
  1232.  
  1233. .in -5
  1234. .fi
  1235. The macro xx assumes the first parameter to be a variable, which is
  1236. centered on the page, and also entered in the table of contents.
  1237. Note the usage of "_$_$1". The lines within a macro are scanned from
  1238. right to left for parameter expansion. Thus, "_$1" is expanded first,
  1239. resulting in "_$<first parameter>". This is later expanded as a variable.
  1240.  
  1241. .bp
  1242. .cl
  1243. .sect 0 6.0 Example macros
  1244.  
  1245. .nf
  1246. .in +5
  1247. .cc \
  1248. .!
  1249. .! macros to create a point-form lists.
  1250. .! note the use of number registers within
  1251. .! the macros.
  1252. .!------------
  1253. .define list
  1254. .nr a _$1    
  1255. .in _$1
  1256. .en
  1257. .!------------
  1258. .define item
  1259. .sp
  1260. .ti -_@na
  1261. _$1
  1262. .en
  1263. .!------------
  1264. .define nolist
  1265. .in -_@na
  1266. .sp
  1267. .en
  1268. .!------------
  1269.  
  1270. \in -5
  1271. \fi
  1272. The "list" macro is used to generate point-form lists. The first parameter
  1273. is an indent value, size of point-str + 1. A typical usage may be as 
  1274. follows:
  1275. \need 16
  1276. \in +5
  1277.  
  1278. \nf
  1279. |
  1280. |Project work involves:
  1281. |.sp
  1282. |.list 3        { size-of-point-str + 1 }
  1283. |.item a)        { "a)" is the point-str }
  1284. |choosing a topic
  1285. |.item b)
  1286. |defining the topic
  1287. |.item c)
  1288. |research
  1289. |.item d)
  1290. |organizing the notes
  1291. |{etc.}
  1292. |.nolist        { readjusts the indent  }
  1293. |
  1294. \in -5
  1295.  
  1296. The above usage will produce the following:
  1297. \need 12
  1298. \in +5
  1299.  
  1300. |
  1301. |Project work involves:
  1302. |
  1303. |a) choosing a topic
  1304. |
  1305. |b) defining the topic
  1306. |
  1307. |c) research
  1308. |
  1309. |d) organizing the notes
  1310. |
  1311.  
  1312. \in -5
  1313. \fi
  1314. The point-form recommendations under section 5.1 (Care and Feeding of 
  1315. Memory) were generated with the same set of macros described above.
  1316. \cc .
  1317. .bp
  1318. .cl
  1319. .sect 0 7.0 Acknowledgements
  1320.  This document was edited by Terry Lim and Steven Tress.
  1321. The format of the document is largely based on The Freshwater Institute
  1322. RUNOFF User's Guide. The Quotes for the various formatting examples are
  1323. from THE QUOTABLE NOTHING BOOK and from 1001 LOGICAL LAWS, ACCURATE
  1324. AXIOMS, PROFOUND PRINCIPLES, TRUSTY TRUISMS, HOMEY HOMILIES, COLORFUL
  1325. COROLLARIES, QUOTABLE QUOTES, AND RAMBUNCTIOUS RUMINATIONS FOR ALL
  1326. WALKS OF LIFE, by Peers, Bennet and Booth, Fawcett Columbine Books,
  1327. New York.
  1328. .bp
  1329. .cl
  1330. .sect 0 Appendix A
  1331. .he /1.0/Appendix A/#/
  1332. .cc \
  1333. \nf
  1334. \nap
  1335. \ce
  1336. Summary of Commands
  1337.  
  1338. ----------------------------------------------------------
  1339. $APR
  1340.         default:    initial: no    break: no
  1341.         enable auto-paragraphing
  1342. ----------------------------------------------------------
  1343. $BOLD
  1344.         default: 1    initial:    break: no
  1345.         boldface (overstrike) next n lines
  1346.         boldface until turned off
  1347. ----------------------------------------------------------
  1348. $BP
  1349.         default: +1    initial: 1    break: yes
  1350.         begin a new page and number it n
  1351. ----------------------------------------------------------
  1352. $BREAK
  1353.         default:    initial:    break: yes
  1354.         cause a break and output current line
  1355. ----------------------------------------------------------
  1356. $CCHAR
  1357.         default: "."    initial: "."    break: no
  1358.         set command control character to char
  1359. ----------------------------------------------------------
  1360. $CENTER
  1361.         default: 1    initial        break: yes
  1362.         center next n lines
  1363.         center until turned off
  1364. ----------------------------------------------------------
  1365. $CL
  1366.         default:    initial:    break: yes
  1367.         enter text into table of contents at level
  1368.         n
  1369. ----------------------------------------------------------
  1370. $CUNDLINE
  1371.         default: words    initial: words    break: no
  1372.         set mode for underline - words or all
  1373. ----------------------------------------------------------
  1374. $DBO
  1375.         default:    initial: no    break: no
  1376.         disable bolding
  1377. ----------------------------------------------------------
  1378. $DEF
  1379.         default:    initial:    break: no
  1380.         define a macro command - ends at ".en"
  1381. ----------------------------------------------------------
  1382. $EBO
  1383.         default:    initial: yes    break: no
  1384.         enable bolding
  1385. ----------------------------------------------------------
  1386. \bp
  1387. ----------------------------------------------------------
  1388. $ECHAR
  1389.         default: "__"    initial: "__"    break: no
  1390.         set universal escape character to char
  1391. ----------------------------------------------------------
  1392. $EFO
  1393.         default: null    initial: null    break: no
  1394.         set footer on odd pages to text
  1395. ----------------------------------------------------------
  1396. $EHE
  1397.         default: null    initial: null    break: no
  1398.         set header on even pages to text
  1399. ----------------------------------------------------------
  1400. $ENM
  1401.         default:    initial:    break: no
  1402.         end the macro definition
  1403. ----------------------------------------------------------
  1404. $FILL
  1405.         default:    initial: yes    break: yes
  1406.         begin filling output lines
  1407. ----------------------------------------------------------
  1408. $FO
  1409.         default: null    initial: null    break: no
  1410.         set footer to text (/lef/center/right/)
  1411. ----------------------------------------------------------
  1412. $HE
  1413.         default: null    initial: null    break: no
  1414.         set header to text (/left/center/right/)
  1415. ----------------------------------------------------------
  1416. $INDENT
  1417.         default: 0    inital: 0    break: yes
  1418.         set left margin to column n+1
  1419. ----------------------------------------------------------
  1420. $JUST
  1421.         default:    initial: yes    break: yes
  1422.         begin justifying filled lines
  1423. ----------------------------------------------------------
  1424. $LEX
  1425.         default:    initial:    break: no
  1426.         rename a command
  1427. ----------------------------------------------------------
  1428. $LS
  1429.         default: 1    initial: 1    break: no
  1430.         set line spacing to n
  1431. ----------------------------------------------------------
  1432. $NE
  1433.         default: 0    initial:    break: yes/no
  1434.         need n lines. Break and generate a new page
  1435.         if not available
  1436. ----------------------------------------------------------
  1437. \bp
  1438. ----------------------------------------------------------
  1439. $NOFILL
  1440.         default:    initial: no    break: yes
  1441.         stop filling
  1442. ----------------------------------------------------------
  1443. $NOJUST
  1444.         default:    initial: no    break: yes
  1445.         stop justifying
  1446. ----------------------------------------------------------
  1447. $NPA
  1448.         default:    initial: no    break: yes
  1449.         disable paging
  1450. ----------------------------------------------------------
  1451. $OFO
  1452.         default: null    initial: null    break: no
  1453.         set footer on odd pages to text
  1454. ----------------------------------------------------------
  1455. $OHE
  1456.         default: null    initial: null    break: no
  1457.         set header on odd pages to text
  1458. ----------------------------------------------------------
  1459. $M1
  1460.         default: 3    initial: 3    break: no
  1461.         lines between top of page and header
  1462. ----------------------------------------------------------
  1463. $M2
  1464.         default: 2    initial: 2    break: no
  1465.         lines between header and text
  1466. ----------------------------------------------------------
  1467. $M3
  1468.         default: 2     initial: 2    break: no
  1469.         lines between text and footer
  1470. ----------------------------------------------------------
  1471. $M4
  1472.         default: 3    initial: 3    break: no
  1473.         lines between footer and bottom
  1474. ----------------------------------------------------------
  1475. $NAP
  1476.         default:    initial: yes    break: no
  1477.         disable auto-paragraphing
  1478. ----------------------------------------------------------
  1479. $PA
  1480.         default:    initial: yes    break: yes
  1481.         enable paging
  1482. ----------------------------------------------------------
  1483. $PC
  1484.         default: 3    initial: 3    break: yes
  1485.         print table of contents, indent each level
  1486.         n spaces
  1487. ----------------------------------------------------------
  1488. \bp
  1489. ----------------------------------------------------------
  1490. $PL
  1491.         default: 66    initial: 66    break: no
  1492.         set page length to n lines
  1493. ----------------------------------------------------------
  1494. $PN
  1495.         default:    initial: arabic    break: no
  1496.         set page numbering to arabic or roman
  1497. ----------------------------------------------------------
  1498. $PO
  1499.         default: 0    initial: 0    break: yes
  1500.         set page offset to n spaces
  1501. ----------------------------------------------------------
  1502. $RM 
  1503.         default: 65    initial: 65    break: no
  1504.         set right margin to column n
  1505. ----------------------------------------------------------
  1506. $RST
  1507.         default:    initial:    break: yes
  1508.         restore the formatter context from context
  1509.         stack
  1510. ----------------------------------------------------------
  1511. $SAVE
  1512.         default:    initial:    break: yes
  1513.         save the current formatter context on 
  1514.         context stack
  1515. ----------------------------------------------------------
  1516. $SOU
  1517.         default:     initial: input    break: no
  1518.         switch input to file
  1519. ----------------------------------------------------------
  1520. $SPACE
  1521.         default: 1     initial:    break: yes
  1522.         space n lines except at top of page
  1523. ----------------------------------------------------------
  1524. $SPACETO
  1525.         default: 0     initial:    break: yes
  1526.         space to line +n from top
  1527.         space to line -n from bottom
  1528. ----------------------------------------------------------
  1529. $TINDENT
  1530.         default: 0    initial:    break: yes
  1531.         temporarily indent next output n spaces
  1532. ----------------------------------------------------------
  1533. \bp
  1534. ----------------------------------------------------------
  1535. $UNDLINE
  1536.         default: 1    initial        break: no
  1537.         underline next n lines
  1538.         underline until turned off
  1539. ----------------------------------------------------------
  1540. $VGET
  1541.         default:    initial:    break: no
  1542.         set variable interactively, using text
  1543.         as prompt
  1544. ----------------------------------------------------------
  1545. $VRG
  1546.         default: 0    initial: 0    break: no
  1547.         set number register (a-z) to n
  1548. ----------------------------------------------------------
  1549. $VSET
  1550.         default:    initial:    break: no
  1551.         set variable to text
  1552. ----------------------------------------------------------
  1553. $WRT
  1554.         default:    initial:    break: no
  1555.         write a special string to output. line
  1556.         counter does not change
  1557. ----------------------------------------------------------
  1558. \cc .
  1559. .bp 1
  1560. .pn roman
  1561. .he ////
  1562. .fo //- # -//
  1563. .ce on
  1564. Table Of Contents
  1565.  
  1566. PROFF 1.0
  1567. .ce off
  1568. .pc
  1569.